package cn.kgc.javaweb.utils;

import lombok.Data;

/**
 * @author: mosin
 * @version: v1.0  2022/9/7
 */
@Data
public class ResponseResult {

    private Integer code;
    private String msg;
    private Object data;

    //操作成功 没有返回值  增删改

    public ResponseResult(){
        this.code  = 200;
        this.msg = "操作成功";
    }

    // 操作成功  有返回值   查询
    public ResponseResult(Object data){
        this();
        this.data = data;
    }

    //操作失败
    public ResponseResult(Integer code,String msg){
          this.code =code;
          this.msg = msg;
    }

}
